var t = require;
var e = module;
var o = exports;
var n =
    (this && this.__extends) ||
    (function () {
        var t = function (e, o) {
            return (t =
                Object.setPrototypeOf ||
                ({__proto__: []} instanceof Array &&
                    function (t, e) {
                        t.__proto__ = e;
                    }) ||
                function (t, e) {
                    for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
                })(e, o);
        };
        return function (e, o) {
            function n() {
                this.constructor = e;
            }
            t(e, o), (e.prototype = null === o ? Object.create(o) : ((n.prototype = o.prototype), new n()));
        };
    })();
Object.defineProperty(o, "__esModule", {value: !0});
var r = t("fsm"),
    a = t("OnCollision"),
    i = t("fun"),
    s = t("bombBoxDestory"),
    c = (function (t) {
        function e() {
            var e = (null !== t && t.apply(this, arguments)) || this;
            return (e.list = []), e;
        }
        return (
            n(e, t),
            (e.prototype.onEnter = function () {
                (this.array = this.context.node.getComponent(a.default).array),
                    (this.time = this.context.data.demageDuration);
            }),
            (e.prototype.onUpdate = function (t) {
                if (this.array.length > 0)
                    for (var e = 0; e < this.array.length; e++) {
                        var o = i.getbuildbody(this.array[e]);
                        (this.context.nottarget && this.context.nottarget == o) ||
                            this.list.includes(o) ||
                            (o.on被攻击(this.context), this.list.push(o));
                    }
                (this.time -= t), this.time <= 0 && r.changeState(this.context, s.default);
            }),
            e
        );
    })(t("bombBoxState").default);
o.default = c;
